package com.zwxbc.funplay.dao;

import com.zwxbc.funplay.entity.PlayerGameLibrary;

import java.util.List;

public interface PlayerGameLibraryDao {

	/**
	 * 添加游戏库
	 * @param library
	 */
	int addPlayerGameLibrary(PlayerGameLibrary library);

	/**
	 * 根据编号获取游戏库
	 * @param libraryId
	 * @return
	 */
	PlayerGameLibrary getPlayerGameLibraryById(Long libraryId);

	/**
	 * 列表游戏库
	 * @return
	 */
	List<PlayerGameLibrary> getAllPlayerGameLibraries();

	/**
	 * 修改休息库
	 * @param library
	 */
	int updatePlayerGameLibrary(PlayerGameLibrary library);

	/**
	 * 删除游戏库
	 * @param libraryId
	 */
	int deletePlayerGameLibrary(Long libraryId);

	/**
	 * 根据玩家id获取游戏库
	 * @param playerId
	 * @return
	 */
	List<PlayerGameLibrary> getPlayerGameLibraryListByPlayerId(Long playerId);

	/**
	 * 玩家是否拥有游戏
	 * @param gameId
	 * @param playerId
	 * @return
	 */
	int playerIfHaveGame(Long gameId, Long playerId);

	/**
	 * 根据玩家Id获取游戏列表
	 * @param playerId
	 * @return
	 */
	List<PlayerGameLibrary> getGameListByPlayerId(Long playerId);
}
